package cn.neusoft.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor

public class ResultBean {
	private Integer code;
	private String msg;
	private Object data;

	public ResultBean(Integer code, String msg) {
		this.code = code;
		this.msg = msg;
	}
	public static ResultBean SUCCESS(Object data) {
		return new ResultBean(200,"success",data);
	}
	public static ResultBean SUCCESS() {
		return new ResultBean(200,"success",null);
	}
	public static ResultBean ERROR() {
		return new ResultBean(500,"error");
	}
	public static ResultBean ERROR(String msg) {
		return new ResultBean(500,msg);
	}
	public static ResultBean ERROR(Integer code,String msg) {
		return new ResultBean(code,msg);
	}
}
